import 'package:json_annotation/json_annotation.dart';

part 'language_model.g.dart';


@JsonSerializable()
class LanguageModel extends Object {

  List<Items>? items;

  int errcode;

  String message;

  LanguageModel(this.items,this.errcode,this.message,);

  factory LanguageModel.fromJson(Map<String, dynamic> srcJson) => _$LanguageModelFromJson(srcJson);

  Map<String, dynamic> toJson() => _$LanguageModelToJson(this);

}


@JsonSerializable()
class Items extends Object {

  int id;

  String locale_code;

  String language;

  String flag_picture;

  String last_updated;

  int is_enabled;

  int is_default;

  int currency_id;

  int sort;

  Currency? currency;

  Items(this.id,this.locale_code,this.language,this.flag_picture,this.last_updated,this.is_enabled,this.is_default,this.currency_id,this.sort,this.currency,);

  factory Items.fromJson(Map<String, dynamic> srcJson) => _$ItemsFromJson(srcJson);

  Map<String, dynamic> toJson() => _$ItemsToJson(this);

}


@JsonSerializable()
class Currency extends Object {

  int id;

  String name;

  String symbol;

  int is_default;

  String? rate;

  Currency(this.id,this.name,this.symbol,this.is_default,this.rate,);

  factory Currency.fromJson(Map<String, dynamic> srcJson) => _$CurrencyFromJson(srcJson);

  Map<String, dynamic> toJson() => _$CurrencyToJson(this);

}


